package com.zhny.aiot.leakage.valve.v2.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class LeakageValveV2StoreEntry extends StoreEntity {
    @PropertyValue(alias = "电压",description = "电池电压",unit = "V",icon= IconConstract.Voltage,variableType= VariableType.Numerical,actions={
            @ActionValue(name= Operate.Check, commandCode="queryVoltage", eventType= EventType.Click)
    })
    private Double voltage;
    @PropertyValue(alias = "阀门1状态",description = "阀门1开关状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve1",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve1",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean aStatus;
    @PropertyValue(alias = "阀门2状态",description = "阀门2开关状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve2",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve2",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean bStatus;
    @PropertyValue(alias = "阀门3状态",description = "阀门3开关状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve3",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve3",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean cStatus;
    @PropertyValue(alias = "阀门4状态",description = "阀门4开关状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve4",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve4",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean dStatus;
    @PropertyValue(alias = "水流开关1状态",description = "水流1状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryStatus",eventType=EventType.Click)
    })
    private Boolean aWaterFlow;
    @PropertyValue(alias = "水流开关2状态",description = "水流2状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryStatus",eventType=EventType.Click)
    })
    private Boolean bWaterFlow;
    @PropertyValue(alias = "水流开关3状态",description = "水流3状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryStatus",eventType=EventType.Click)
    })
    private Boolean cWaterFlow;
    @PropertyValue(alias = "水流开关4状态",description = "水流4状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryStatus",eventType=EventType.Click)
    })
    private Boolean dWaterFlow;
    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("voltage=").append(this.voltage);
        sb.append(", valve1status=").append(this.aStatus);
        sb.append(", valve2status=").append(this.bStatus);
        sb.append(", valve3status=").append(this.cStatus);
        sb.append(", valve4status=").append(this.dStatus);
        return sb.toString();
    }
}
